const Mock = require('mockjs')

module.exports = () => {
  const Mock = require('mockjs')
  const data = Mock.mock({
    'carList|10': [
      {
        id: '@id()',
        publishTime: '@date()',
        img: '@image(150x150, @color(), @city())',
        count: 0,
        distance: '@integer(1, 100)', // 距离远近
        mileage: '@integer(0.1, 10)', // 里程
        title: '宝马三系_' + '@ctitle()', //
        desc: '@cword(30)', // 车辆描述
        carAge: '@integer(1, 5)', // 车龄
        price: '@integer(20, 100)', // 车系价格
        'type|+1': [1, 0], // 1. 有货 0: 没有货
      },
    ],
  })
  return data
}
